Automatic creation of affinity-type rules for resources in distributed computer systems

ABSTRACT

A resource management system and method for automatically creating affinity-type rules for resource management in a distributed computer system uses association inference information for at least one resource to determine resource association between resources, which is used to automatically create an affinity-type rule for the resources. The affinity-type rule is considered when executing a resource management operation.

BACKGROUND

Sharing resources in a networked computer system, such as processors,computer memories, network bandwidth and data storage facilities, amongclients, e.g., virtual machines (VMs), running on the system canincrease efficiency by reducing maintenance and operating costs,allowing flexibility with respect to individual resource usage, andsimplifying resource management. With respect to shared storage, thebenefits include data consolidation, universal access to data, ease ofstorage management, and support for live migration of virtualizedenvironments. Thus, efficiently and effectively managing the sharedresources for the clients running in the networked computer system is animportant task to ensure that the clients are operating at their desiredlevels.

In some conventional virtualized infrastructures, an administrator isallowed to specify affinity-type rules for various resources. As anexample, a client-client affinity rule ensures that all clients in aspecified group will be placed on the same host computer. As anotherexample, a client-client anti-affinity rule ensures that clients in aspecified group will be placed on different host computers so that notwo clients are placed on the same host computer. As another example, aclient-host affinity rule ensures that specified clients are only placedin specified host computers. As another example, a client-hostanti-affinity rule ensures that specified clients are never placed inany of specified host computers. However, since there can be hundreds oreven thousands of clients running in some virtualized infrastructures,manually creating affinity-type rules for some of these clients can beoverwhelming. In addition, since conditions or situations may changeover time, established affinity-type rules may need to be repeatedlymodified in response to changes in conditions or situations, which mayrequire significant amount of manual operations.

SUMMARY

A resource management system and method for automatically creatingaffinity-type rules for resource management in a distributed computersystem uses association inference information for at least one resourceto determine resource association between resources, which is used toautomatically create an affinity-type rule for the resources. Theaffinity-type rule is considered when executing a resource managementoperation.

A method for automatically creating affinity-type rules for resourcemanagement in a distributed computer system in accordance with anembodiment of the invention comprises receiving association inferenceinformation for at least one resource, determining resource associationbetween the at least one resource and at least one other resource in thedistributed computer system based on the received association inferenceinformation, automatically creating an affinity-type rule for the atleast one resource and at least one other resource using the determinedresource association, and executing a resource management operation withconsideration of the affinity-type rule for the at least one resourceand the at least one other resource. In some embodiments, the steps ofthis method are performed when program instructions contained in acomputer-readable storage medium are executed by one or more processors.

A resource management system supported by hardware in a distributedcomputer system in accordance with an embodiment of the inventioncomprises a rule creation unit and a resource management module. Therule creation unit is configured to receive association inferenceinformation for at least one resource and to determine resourceassociation between the at least one resource and at least one otherresource based on the received association inference information. Inaddition, the rule creation unit is further configured to automaticallycreate an affinity-type rule for the at least one resource and at leastone other resource using the determined resource association. Theresource management module is configured to execute a resourcemanagement operation with consideration of the affinity-type rule forthe at least one resource and at least one other resource.

Other aspects and advantages of embodiments of the present inventionwill become apparent from the following detailed description, taken inconjunction with the accompanying drawings, illustrated by way ofexample of the principles of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a distributed computer system in accordancewith an embodiment of the invention.

FIG. 2 is a block diagram of a host computer in accordance with anembodiment of the invention.

FIG. 3 is a block diagram of a resource management system included inthe distributed computer system in accordance with an embodiment of theinvention.

FIG. 4 is a block diagram of the resource management system inaccordance with another embodiment of the invention.

FIG. 5 is a flow diagram of a method for automatically creatingaffinity-type rules for resource management in a distributed computersystem in accordance with an embodiment of the invention.

Throughout the description, similar reference numbers may be used toidentify similar elements.

DETAILED DESCRIPTION

It will be readily understood that the components of the embodiments asgenerally described herein and illustrated in the appended figures couldbe arranged and designed in a wide variety of different configurations.Thus, the following more detailed description of various embodiments, asrepresented in the figures, is not intended to limit the scope of thepresent disclosure, but is merely representative of various embodiments.While the various aspects of the embodiments are presented in drawings,the drawings are not necessarily drawn to scale unless specificallyindicated.

The present invention may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. The describedembodiments are to be considered in all respects only as illustrativeand not restrictive. The scope of the invention is, therefore, indicatedby the appended claims rather than by this detailed description. Allchanges which come within the meaning and range of equivalency of theclaims are to be embraced within their scope.

Reference throughout this specification to features, advantages, orsimilar language does not imply that all of the features and advantagesthat may be realized with the present invention should be or are in anysingle embodiment of the invention. Rather, language referring to thefeatures and advantages is understood to mean that a specific feature,advantage, or characteristic described in connection with an embodimentis included in at least one embodiment of the present invention. Thus,discussions of the features and advantages, and similar language,throughout this specification may, but do not necessarily, refer to thesame embodiment.

Furthermore, the described features, advantages, and characteristics ofthe invention may be combined in any suitable manner in one or moreembodiments. One skilled in the relevant art will recognize, in light ofthe description herein, that the invention can be practiced without oneor more of the specific features or advantages of a particularembodiment. In other instances, additional features and advantages maybe recognized in certain embodiments that may not be present in allembodiments of the invention.

Reference throughout this specification to “one embodiment,” “anembodiment,” or similar language means that a particular feature,structure, or characteristic described in connection with the indicatedembodiment is included in at least one embodiment of the presentinvention. Thus, the phrases “in one embodiment,” “in an embodiment,”and similar language throughout this specification may, but do notnecessarily, all refer to the same embodiment.

Turning now to FIG. 1, a distributed computer system 100 in accordancewith an embodiment of the invention is shown. As shown in FIG. 1, thedistributed computer system includes a network 102, a number of hostcomputers H-1, H-2 . . . H-M (where M is a positive integer), storage104, a management server 106 with a resource management system 108. Thehost computers, the storage and the management server are connected tothe network. Thus, each of the host computers is able to access thestorage via the network and may share the resources provided by thestorage with the other host computers. Consequently, any process runningon any of the host computers may also access the storage via thenetwork.

The host computers H-1, H-2 . . . H-M are physical computer systems thathosts or supports one or more clients so that the clients are executingon the physical computer systems. As used herein, the term “client” isany software entity that can run on a computer system, such as asoftware application, a software process or a virtual machine (VM). Thehost computers may be servers that are commonly found in datacenters.The host computers may be installed in multiple server racks in the sameor different facilities.

Turning now to FIG. 2, components of a host computer 200 that isrepresentative of the host computers H-1, H-2 . . . H-M in accordancewith an embodiment of the invention are shown. In FIG. 2, the physicalconnections between the various components of the host computer are notillustrated. In the illustrated embodiment, the host computer isconfigured to support a number of clients 220A, 220B . . . 220L (where Lis a positive integer), which are VMs. The number of VMs supported bythe host computer can be anywhere from one to more than one hundred. Theexact number of VMs supported by the host computer is only limited bythe physical resources of the host computer. The VMs share at least someof the hardware resources of the host computer, which include one ormore system memories 222, one or more processors 224, a storageinterface 226, and a network interface 228. Each system memory 222,which may be random access memory (RAM), is the volatile memory of thehost computer. Each processor 224 can be any type of a processor, suchas a central processing unit (CPU) commonly found in a server. Thestorage interface 226 is an interface that allows that host computer tocommunicate with the storage 104. As an example, the storage interfacemay be a host bus adapter or a network file system interface. Thenetwork interface 228 is an interface that allows the host computer tocommunicate with other devices connected to the network 102. As anexample, the network interface may be a network adapter.

In the illustrated embodiment, the VMs 220A, 220B . . . 220L run on“top” of a hypervisor 230, which is a software interface layer that,using virtualization technology, enables sharing of the hardwareresources of the host computer 200 by the VMs. However, in otherembodiments, one or more of the VMs can be nested, i.e., a VM running inanother VM. Any computer virtualization architecture can be implemented.For example, the hypervisor may run on top of the host computer'soperating system or directly on hardware of the host computer. With thesupport of the hypervisor, the VMs provide isolated execution spaces forguest software. Each VM may include a guest operating system 232 and oneor more guest applications 234. The guest operating system 232 managesvirtual system resources made available to the corresponding VM by thehypervisor 230, and, among other things, the guest operating systemforms a software platform on top of which the guest applications 234run.

Similar to any other computer system connected to the network 102, theVMs 220A, 220B . . . 220L are able to communicate with each other usingan internal software OSI Layer 2 switch (not shown) and with othercomputer systems connected to the network using the network interface228 of the host computer 200. In addition, the VMs are able to accessthe storage 104 using the storage interface 226 of the host computer.

The host computer 200 also includes a local scheduler 236 that operatesas part of a resource management system, such as VMware vSphere®Distributed Resource Scheduler™ (DRS) (“VMware vSphere” and “DistributedResource Scheduler” are trademarks of VMware, Inc.), to manage resourcerequests made by the VMs 220A, 220B . . . 220L. Although the localscheduler is illustrated in FIG. 2 as being separate from the hypervisor230, the local scheduler may be implemented as part of the hypervisor.In some embodiments, the local scheduler is implemented as one or moresoftware programs running on the host computer. However, in otherembodiments, the local scheduler may be implemented using anycombination of software and hardware.

Turing back to FIG. 1, the network 102 can be any type of computernetwork or a combination of networks that allows communications betweendevices connected to the network. The network 102 may include theInternet, a wide area network (WAN), a local area network (LAN), astorage area network (SAN), a fibre channel network and/or othernetworks. The network 102 may be configured to support protocols suitedfor communications with storage arrays, such as Fibre Channel, InternetSmall Computer System Interface (iSCSI), Fibre Channel over Ethernet(FCoE) and HyperSCSI.

The storage 104 is used to store data for the host computers H-1, H-2 .. . H-M, which can be accessed like any other storage device connectedto computer systems. In an embodiment, the storage can be accessed byentities, such as clients running on the host computers, using any filesystem, e.g., virtual machine file system (VMFS) or network file system(NFS). The storage includes one or more computer data storage devices110, which can be any type of storage devices, such as solid-statedevices (SSDs), hard disks or a combination of the two. At least some ofthese storage devices may be local storage devices of the hostcomputers, e.g., locally attached disks or SSDs within the hostcomputers. The storage devices may operate as components of anetwork-attached storage (NAS) and/or a storage area network (SAN). Thestorage includes a storage managing module 112, which manages theoperation of the storage. In an embodiment, the storage managing moduleis a computer program executing on one or more computer systems (notshown) of the storage. The storage supports multiple datastores DS-1,DS-2 . . . DS-X (where X is a positive integer), which may be identifiedusing logical unit numbers (LUNs). In an embodiment, the datastores arevirtualized representations of storage facilities. Thus, each datastoremay use the storage resource from more than one storage device includedin the storage. The datastores are used to store data associated withthe clients supported by the host computers. For virtual machines, thedatastores may be used to store virtual storage, e.g., virtual disks,used by each of the virtual machines, as well as other files needed tosupport the virtual machines.

The management server 106 operates to monitor and manage the hostcomputers H-1, H-2 . . . H-M, including clients running on the hostcomputers. As illustrated in FIG. 1, in an embodiment, the managementserver includes the resource management system 108, which can be enabledby a user, to perform resource management operations on the hostcomputers, such as, but not limited to, resource allocation, loadbalancing and placement of clients on different host computers. Asdescribed in more detail below, the resource management system operatesto automatically create affinity-type rules for various resources in thedistributed computer system 100, which can increase performance of theclients running in the system. Affinity-type rules are described indetail below. In the illustrated embodiment, the resource managementsystem is part of the management server. However, in other embodiments,the resource management system may be physically separate from themanagement server and situated external to the management server. Still,in other embodiments, the resource management system may be distributedamong different components of the distributed computer system so thatparts of the resource management system operate in different components,such as the management server and the host computers. The resourcemanagement system may be implemented in any combination of hardware andsoftware. In a particular implementation, the resource management systemmay be implemented as software programs that are executed by one or moreprocessors of the one or more physical computers that are supporting theresource management system, such as the processors of the managementserver.

In some embodiments, the management server 106 may be a physicalcomputer, and thus, includes memory and one or more processors, as wellas other components commonly found in a computer system. In otherembodiments, the management server may be implemented as one or moresoftware programs running on one or more physical computers, such as thehost computer 200 shown in FIG. 2, or virtual computers, such as the220A, 220B . . . 220L. In an implementation, the management server is aVMware vCenter™ server with at least some of the features available forsuch a server, and some or all of the components of the resourcemanagement system 108 may be incorporated into VMware DistributedResource Scheduler (DRS).

As mentioned above, the resource management system 108 can automaticallycreate affinity-type rules for various resources in the distributedcomputer system 100. Affinity-type rules define how designated resourcesshould be associated with each other. In general, affinity rules specifythat designated resources should be connected to each other, whileanti-affinity rules specify that designated resource should bedisconnected from each other. The following are some commonaffinity-type rules for clients and host computers:

-   -   (1) Client-host affinity rules make a group of clients affine to        a group of host computers. Under these rules, the clients in the        group are only placed in one of the specified host computers,        and are never moved to a host computer outside of this group of        host computers.    -   (2) Client-host anti-affinity rules make a group of clients        anti-affine to a group of host computers. Under these rules, the        clients in the group are never placed in any of the host        computers from the specified group.    -   (3) Client-client anti-affinity rules make a group of clients        anti-affine to each other. Under these rules, no two clients in        the specified group are placed in the same host computer.    -   (4) Client-client affinity rules make a group of clients affine        to each other. Under these rules, the clients in the group are        placed in the same host computer.        In some situations a group of clients or host computers may        include only a single client or a single host computer. These        affinity and anti-affinity rules may be soft or hard. If an        affinity-type rule is a hard rule, then that rule must be        followed, which means that if an operation is not possible        without breaking the hard rule, then the operation cannot        proceed. If an affinity-type rule is a soft rule, then that rule        should be followed, which means that if an operation is not        possible without breaking the soft rule, then the soft rule can        be ignored and the operation is allowed to proceed without        following the rule. Similar affinity-type rules can exist for        other resources, such as storage and network resources.

In conventional resource management systems, the affinity-type rules aremanually specified by administrators. However, since there can behundreds or even thousands of clients running in a virtualizedinfrastructure, such as the distributed computer system 100, manuallycreating affinity-type rules for some of these clients can be atime-consuming process. In addition, as conditions or situations changeover time in the virtualized infrastructure, affinity-type rules forvarious resources may need to be repeatedly changed in response tochanges in conditions or situations.

In contrast, the resource management system 108 automatically createsaffinity-type rules for resources under certain conditions, such as whena newly instantiated or powered-on client is placed in one of the hostcomputers in the distributed computer system or when a new host computeris added to the distributed computer system. In addition, the resourcemanagement system automatically modifies existing affinity-type rulesfor resources under other conditions. Automatic creation andmodification of affinity-type rules by the resource management systemare described in more detail below.

Turning now to FIG. 3, components of the resource management system 108in accordance with an embodiment of the invention are shown. Asillustrated in FIG. 3, the resource management system includes a userinterface unit 302, a rule creation unit 304, a placement module 306 anda load balancing module 308. These components of the resource managementsystem may be implemented in any combination of hardware, software andfirmware. In one implementation, these components of the resourcemanagement system are implemented as one or more software programsrunning in the management server 106 using one or more processorsassociated with or installed in the management server. In otherimplementations, these components of the resource management system areimplemented as one or more software programs running on differentdevices in the distributed computer system 100 using one or moreprocessors associated with or installed in the different devices.

The user interface unit 302 of the resource management system 108operates to allow a user, such as an administrator of the distributedcomputer system 100, to interact with the resource management system.The user interface unit allows the user to input data into the resourcemanagement system. In particular, the user interface unit allows theuser to input information that is used by the rule creation unit 304, asdescribed below. The user interface unit also allows the user toimplement any recommendations made by the placement module 306 and theload balancing module 308. The user interface unit may provide one ormore graphical user interfaces for a user to input data using any inputmechanism, such as a keyboard or a touchscreen monitor connected to themanagement server 106.

The rule creation unit 304 of the resource management system 108operates to automatically generate affinity-type rules for resources inthe distributed computer system 100. That is, the rule creation unitgenerates affinity-type rules for resources without explicitspecifications from an administrator to create the affinity-type rules.Explicit specifications may involve an administrator using a graphicaluser interface to select each of the resources being considered for asingle affinity-type rule. The rule creation unit creates affinity-typerules without having an administrator perform these manual operations toexplicitly create affinity-type rules.

The rule creation unit 304 may generate affinity-type rules usingresource association inferences based on information derived from one ormore sources, such as the placement module 306, without humanintervention with respect to the generation of the inference informationand the generation of the affinity-type rules. However, in some cases,inference information may be manually provided by an administrator viathe user interface unit 302. When association inference information fora resource is received, the rule creation unit analyzes the informationand determines any resource association between that resource and anyother resource or resources in the distributed computer system 100.There are various information that can indicate resource associations toautomatically generate affinity-type rules. As an example, operationalcharacteristics of a new client, i.e., latency sensitivity of a VM,being placed may be used to infer association of the client to one ormore host computers. As another example, the physical location of a hostcomputer into which a new client is being placed may be used to inferassociation of the client to that physical location. The type ofinformation used to create affinity-type rules can vary depending ondifferent use scenarios. The rule creation unit may be configurable torecognize select use scenarios so that an administrator can control theaffinity-type rules that are automatically created by the rule creationunit, as well as the type of information being used to create thoserules. Some of these use scenarios that can be recognized by the rulecreation unit will be described below.

The placement module 306 of the resource management system 108 operatesto determine the initial placements of new clients in the host computersH-1, H-2 . . . H-M and the placements of virtual disks for the newclients in the datastores DS-1, DS-2 . . . DS-X. In an embodiment, theplacement module selects a host computer among all possible hostcomputers in the distributed computer system 100 that can support aclient to be placed and a datastore connected to the selected hostcomputer for client placement. The placement module searches forsuitable host computers in the distributed computer system that cansatisfy the resource requirements of a client to be placed, such as CPU,RAM, network and storage resources, and any policy requirements for theclient to be placed, such as affinity and anti-affinity rules. Inselecting one of the suitable host computers to place the client, theplacement module considers current resource utilization metrics of thehost computers, i.e., how much resources are being utilized at the hostcomputers. When considering storage utilization metrics, the placementmodule determines the best datastore connected to each suitable hostcomputer. When a suitable host computer is selected for the client, thebest datastore connected to that host computer is also selected for theclient.

In some embodiments, the placement module 306 ranks the suitable hostcomputers using the resource utilization metrics. As an example, asuitable host computer with low CPU utilization metrics may be rankedhigher than a suitable host computer with higher CPU utilizationmetrics. The top ranked host computer can then be presented to anadministrator for approval, which can be made via a graphical userinterface provided by the user interface unit 302. In other embodiments,the new client can be automatically placed in the top ranked hostcomputer without approval by an administrator.

In some embodiments, the placement module 306 provides resourceassociation inference information to the rule creation unit 302 so thataffinity-type rules can be generated based on that information. In anembodiment, the resource association inference information may begeographical preference for a new client being placed in the distributedcomputer system 100. In this embodiment, the host computers H-1, H-2 . .. H-M in the distributed computer system are located in differentgeographical locations, which may be defined by any geographical areas,such as countries or regions, which may be parts of countries, e.g.,Western United States (US-West) and Eastern United States (US-East), orregions comprising multiple countries, e.g., Western Europe, EasternEurope and Asia-Pacific (APAC) region. When a new client is being placedin the distributed computer system, the placement module may present anoption to an administrator to select a desired geographical locationfrom a list of possible geographical locations, for example, using agraphical user interface provided by the user interface unit 302. Once ageographical location has been selected by the administrator, theplacement module will limit the search of a host computer and adatastore to place the new client to the selected geographical location.In this embodiment, the resources, including host computers anddatastores, in the distributed computer system have been tagged withgeographical information.

The tagging of resources with geographical information can be achievedby manual processes. In these processes, when a resource is connected toor otherwise made available in the distributed computer system 100, anadministrator will be asked to enter the geographical location for thatresource, for example, via a graphical user interface provided by theuser interface unit 302. Once the graphical location has been entered,the resource is tagged with the provided geographical location.

The tagging of resources with geographical information can also beachieved by automatic processes. In these processes, when a resource isconnected to or otherwise made available in the distributed computersystem, a discovery module will extract non-geographical informationthat indicates the geographical location of the resource. Once thegraphical location of the resource has been determined using theextracted information, the resource is tagged with that geographicallocation by the discovery module. Such a discovery module may beincluded in the resource management system 108, as illustrated in FIG.4. However, in other embodiments, the discovery module 400 shown in FIG.4 may be located in another component of the distributed computer system100 or distributed in multiple components of the distributed computersystem.

The non-geographical information that indicates the geographicallocation of a resource can vary from resource to resource. For example,for a host computer being added to the distributed computer system 100supported by the management server 106, the discovery module can executean auto-discovery process of the Internet Protocol (IP) address rangefor the host computer. This IP address range is maintained by themanagement server 106. Using the discovered IP address range, thediscovery then determines the geographical location associated with theIP address range. The discovery module can then tag the host computerwith the determined geographical location. As an example, a tagindicating the determined geographical location can be added to the hostcomputer name itself, e.g., an ESXi host name. This geographicallocation information of the host computer can then be used by theplacement module 306 when the selected geographical location of a newclient being placed in the distributed computer system is the samegeographical location of the host computer.

In addition to selecting a host computer in the selected geographicallocation for a client being placed, the placement module 306 alsoprovides information to the rule creation unit 304 so that a client-hostaffinity rule can be automatically created or modified by the rulecreation unit. The client-host affinity rule may be either soft or hardrule as predefined by a default setting of the rule creation unit or asmanually set by an administrator. If the client being placed is thefirst client with this geographical location preference, then a newclient-host affinity rule will be created by the rule creation unit inwhich the client is associated with a group of host computers that aretagged with the selected geographical location. When a subsequent clientwith the same geographical preference is placed, the existingclient-host affinity rule is updated by the rule creation unit toinclude that subsequent client. The client-host affinity rule ensuresthat the clients that belong to the rule will always remain at thegeographical location even when the clients are rebooted or migrated toanother host computer in the geographical location due to load balancingor other resource management operations.

There are many reasons to maintain a group of clients in a particulargeographical location. One reason is that moving one or more of theclients outside of that geographical location can have an adverse impacton the performance of services running on that client, which can hurtthe business associated with those services. Another reason may be thatservices being provided by the clients in the group are not allowed tobe performed outside of that geographical location due to law, rules orregulations of one or more countries within that geographical location.Thus, to be in compliance, the clients would need to be limited to thegeographical location.

In some situations, there may be a need to exclude a group of clients toa particular geographical location. In these situations, a client-hostanti-affinity rule based on geographical locations may be automaticallycreated by the rule creation unit 304. The process of creating aclient-host anti-affinity rule based on geographical locations issimilar to the process of creating a client-host affinity rule based ongeographical locations, as described above.

When a new client is being placed in the distributed computer system100, the placement module 306 may present an option to an administratorto select one or more undesirable geographical locations from a list ofpossible geographical locations, for example, using a graphical userinterface provided by the user interface unit 302. Once one or moreundesirable geographical locations have been selected by theadministrator, the placement module will limit the search of a hostcomputer and a datastore to place the new client to other geographicallocations, i.e., geographical locations other than the selectedgeographical locations. It is assumed here that the resources, includinghost computers and datastores, in the distributed computer system 100have been tagged with geographical information in one of the mannersdescribed above.

In addition to selecting a host computer in a geographical locationother than the selected geographical locations for a client beingplaced, the placement module 306 also provides information to the rulecreation unit 304 so that a client-host anti-affinity rule can beautomatically created or modified by the rule creation unit. Theclient-host anti-affinity rule may be either soft or hard rule aspredefined by a default setting of the rule creation unit or as manuallyset by an administrator. If the client being placed is the first clientwith this geographical location preference, then a new client-hostanti-affinity rule will be created by the rule creation unit in whichthe client is associated with a group of host computers that are taggedwith the selected geographical locations. When a subsequent client withthe same geographical preference is placed, the existing client-hostanti-affinity rule is updated by the rule creation unit to include thatsubsequent client. The client-host anti-affinity rule ensures that theclients that belong to the rule will always remain at other geographicallocations, i.e., geographical locations other than the selectedgeographical locations even when the clients are rebooted or migrated toanother host computer due to load balancing or other resource managementoperations.

In another embodiment, the resource association inference informationprovided by the placement module 306 may be non-migration preference fora new client being placed in the distributed computer system 100. As anexample, for latency-sensitive clients and clients using vFlash Cache,it may be desirable to maintain these clients in their original hostcomputers as much as possible. Thus, for these types of clients, afterthe clients have been placed in host computers, the placement modulewill transmit information regarding the clients and the host computersin which the clients were placed to the rule creation unit 304. Inresponse, the rule creation unit will analyze the information todetermine whether these clients have resource associations with theircurrent host computers. The parameters for determining these types ofresource associations may be programmed into the rule creation unit ormay be manually entered into the rule creation unit by an administrator,for example, via a graphical user interface provided by the userinterface unit 302. After the resource associations have beendetermined, the rule creation unit creates a client-host affinity rulefor each of these clients. These affinity rules may be soft rules sothat the clients will not be moved unnecessarily. In some embodiments,these clients may be tagged with information in their shipping productso that the rule creation unit can extract the tagged information tocreate the desired client-host affinity rules.

The load balancing module 308 of the resource management system 108performs load balancing operations on the host computers H-1, H-2 . . .H-M in the distributed computer system 100. The load balancing modulemay move or migrate some of the clients running in the distributedcomputer system from their current host computers to other hostcomputers in the distributed computer system to achieve better loadbalance. Thus, the load balancing module may place one or more clientsrunning on host computers in the distributed computer system 100 indifferent host computers in the distributed computer system. The loadbalancing module performs load balancing operations while taking intoconsideration existing affinity-type rules for at least some of theclients running in the distributed computer system. These existingaffinity-type rules includes rules automatically created by the rulecreation unit 304, as well as any rules manually created by anadministrator. Depending on whether the affinity-type rules are hard orsoft, the load balancing module will strictly adhere to the rules (hard)or try to adhere to the rules (soft). In the case of geographicalpreference, the affinity-type rules ensure that certain clients remainat their current geographical location or never migrated to selectgeographical locations. In the case of non-migration preference, theaffinity-type rules ensures that certain clients are not migratedunnecessary to other host computers.

Although not shown, the resource management system 108 may include otherresource management modules that execute other resource managementoperations with consideration of existing affinity-type rules for atleast some of the clients running in the distributed computer system.These existing affinity-type rules includes rules automatically createdby the rule creation unit 304, as well as any rules manually created byan administrator.

In some embodiments, the resource management system 108 may allow anadministrator to create new conditions, which results in affinity-typerules being created by the rule creation unit 304. As an example, anadministrator may want clients running in a group of host computers in aparticular server rack or in a particular blade enclosure to remain inthose domains for various reasons, including performance and/oravailability. In this example, rather than manually creating an affinityrule by specifying all the clients and the host computers, theadministrator may simply select a group of host computers in aparticular server rack or in a particular blade enclosure and indicate adesire to create a client-host affinity rule, for example, using agraphical user interface provided by the user interface unit 302,without having to select all the clients running on the host computers.In response, the rule creation unit creates a client-host affinity rulefor the group of host computers and all the clients currently running onthose host computers. This affinity rule may be a hard or soft rule.Thus, the clients running on the host computers of the specified groupwill always remain on the host computers of the specified group if theaffinity rule is a hard rule or preferably remain on the host computersof the specified group if the affinity rule is a soft rule. Otherconditions may be specified by an administrator that results inautomatic creation of affinity-type rules for clients and hostcomputers, or other resources in the distributed computer system.

Although the automatic creation of affinity-type rules by the resourcemanagement system 108 have been mostly described herein with respect toclients, e.g., VMs, and host computers, the resource management systemcan automatically create affinity-type rules for any other resources,such as storage and network resources. Some of these affinity-type rulesfor other resources may be automatically created in manners similar tothose described above with respect to clients and host computers.

A method for automatically creating affinity-type rules for resourcemanagement in a distributed computer system in accordance with anembodiment of the invention is described with reference to a flowdiagram of FIG. 5. At block 502, association inference information forat least one resource is received. At block 504, resource associationbetween the at least one resource and at least one other resource isdetermined based on the received association inference information. Atblock 506, an affinity-type rule for the at least one resource and atleast one other resource is automatically created using the determinedresource association. At block 508, a resource management operation isexecuted with consideration of the affinity-type rule for the at leastone resource and the at least one other resource.

Although the operations of the method(s) herein are shown and describedin a particular order, the order of the operations of each method may bealtered so that certain operations may be performed in an inverse orderor so that certain operations may be performed, at least in part,concurrently with other operations. In another embodiment, instructionsor sub-operations of distinct operations may be implemented in anintermittent and/or alternating manner.

It should also be noted that at least some of the operations for themethods may be implemented using software instructions stored on acomputer useable storage medium for execution by a computer. As anexample, an embodiment of a computer program product includes a computeruseable storage medium to store a computer readable program that, whenexecuted on a computer, causes the computer to perform operations, asdescribed herein.

Furthermore, embodiments of at least portions of the invention can takethe form of a computer program product accessible from a computer-usableor computer-readable medium providing program code for use by or inconnection with a computer or any instruction execution system. For thepurposes of this description, a computer-usable or computer readablemedium can be any apparatus that can contain, store, communicate,propagate, or transport the program for use by or in connection with theinstruction execution system, apparatus, or device.

The computer-useable or computer-readable medium can be an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system(or apparatus or device), or a propagation medium. Examples of acomputer-readable medium include a semiconductor or solid state memory,magnetic tape, a removable computer diskette, a random access memory(RAM), a read-only memory (ROM), a rigid magnetic disc, and an opticaldisc. Current examples of optical discs include a compact disc with readonly memory (CD-ROM), a compact disc with read/write (CD-R/W), a digitalvideo disc (DVD), and a Blu-ray disc.

In the above description, specific details of various embodiments areprovided. However, some embodiments may be practiced with less than allof these specific details. In other instances, certain methods,procedures, components, structures, and/or functions are described in nomore detail than to enable the various embodiments of the invention, forthe sake of brevity and clarity.

Although specific embodiments of the invention have been described andillustrated, the invention is not to be limited to the specific forms orarrangements of parts so described and illustrated. The scope of theinvention is to be defined by the claims appended hereto and theirequivalents.

What is claimed is:
 1. A method for automatically creating affinity-typerules for resource management in a distributed computer system, themethod comprising: selecting, by a resource management system of thedistributed computer system, a host computer of the distributed computersystem on which a client will be initially placed; upon selecting thehost system on which the client will be initially placed, determining,by the resource management system, association inference information forthe client, wherein the association inference information includes ageographic preference for the client; determining, by the resourcemanagement system, a resource association between the client and one ormore other resources in the distributed computer system based on theassociation inference information, wherein the one or more otherresources including one or more other clients or host systems in thedistributed computer system, wherein the one or more other resources aretagged with geographical information, and wherein the resourceassociation includes a geographical association between the client and ageographic location for the one or more other resources based on thegeographic preference and the geographical information; andautomatically creating, by the resource management system, anaffinity-type rule for the client and the one or more other resourcesusing the determined resource association, wherein the affinity-typerule specifies that the client and the one or more other resourcesshould be connected to each other or disconnected from each other, andwherein the resource management system performs future resourcemanagement operations in the distributed computer system with respect tothe client or the one or more other resources based on the affinity-typerule.
 2. The method of claim 1, wherein the tagging the one or moreother resources in the distributed computer system with the geographicalinformation includes receiving manual input of the geographicalinformation for the one or more other resources in the distributedcomputer system.
 3. The method of claim 1, wherein the tagging the oneor more other resources in the distributed computer system with thegeographical information includes automatically discovering thegeographical information for the one or more other resources in thedistributed computer system using non-geographical information thatindicates the geographical information for the one or more otherresources.
 4. The method of claim 3, wherein the non-geographicalinformation includes an Internet Protocol address range for a hostcomputer that indicates a geographical location of the host computer. 5.The method of claim 1, wherein the association inference informationincludes a non-migration preference for the client and the resourceassociation includes an association between the client and the hostcomputer, and wherein the automatically creating the affinity-type ruleincludes automatically creating a client-host affinity rule for theclient and the host computer.
 6. The method of claim 1, wherein thedetermining the association inference information includes determining aselection of a group of host computers in a server rack or a bladeenclosure, and wherein the automatically creating the affinity-type ruleincludes automatically creating a client-host affinity rule for the hostcomputers in the group and any clients running on the host computers inthe group.
 7. The method of claim 1, wherein the future resourcemanagement operations include a load balancing operation.
 8. Anon-transitory computer-readable storage medium having stored thereonprogram instructions for automatically creating affinity-type rules forresource management in a distributed computer system, wherein executionof the program instructions by one or more processors of a computersystem causes the one or more processors to perform steps comprising:selecting a host computer of the distributed computer system on which aclient will be initially placed; upon selecting the host system on whichthe client will be initially placed, determining association inferenceinformation for the client, wherein the association inferenceinformation includes a geographic preference for the client; determininga resource association between the client and one or more otherresources in the distributed computer system based on the associationinference information, wherein the one or more other resources includingone or more other clients or host systems in the distributed computersystem, wherein the one or more other resources are tagged withgeographical information, and wherein the resource association includesa geographical association between the client and a geographic locationfor the one or more other resources based on the geographic preferenceand the geographical information; and automatically creating anaffinity-type rule for the client and the one or more other resourcesusing the determined resource association, wherein the affinity-typerule specifies that the client and the one or more other resourcesshould be connected to each other or disconnected from each other, andwherein the computer system performs future resource managementoperations in the distributed computer system with respect to the clientor the one or more other resources based on the affinity-type rule. 9.The non-transitory computer-readable storage medium of claim 8, whereinthe tagging the one or more other resources in the distributed computersystem with the geographical information includes receiving manual inputof the geographical information for the one or more other resources inthe distributed computer system.
 10. The non-transitorycomputer-readable storage medium of claim 8, wherein the tagging the oneor more other resources in the distributed computer system with thegeographical information includes automatically discovering thegeographical information for the one or more other resources in thedistributed computer system using non-geographical information thatindicates the geographical information for the one or more otherresources.
 11. The non-transitory computer-readable storage medium ofclaim 10, wherein the non-geographical information includes an InternetProtocol address range for a host computer that indicates a geographicallocation of the host computer.
 12. The non-transitory computer-readablestorage medium of claim 8, wherein the association inference informationincludes a non-migration preference for the client and the resourceassociation includes an association between the client and the hostcomputer, and wherein the automatically creating the affinity-type ruleincludes automatically creating a client-host affinity rule for theclient and the host computer.
 13. The non-transitory computer-readablestorage medium of claim 8, wherein the determining the associationinference information includes determining a selection of a group ofhost computers in a server rack or a blade enclosure, and wherein theautomatically creating the affinity-type rule includes automaticallycreating a client-host affinity rule for the host computers in the groupand any clients running on the host computers in the group.
 14. Thenon-transitory computer-readable storage medium of claim 8, wherein thefuture resource management operations include a load balancingoperation.
 15. A computer system comprising: a processor; and anon-transitory computer readable medium having stored thereon programcode for automatically creating affinity-type rules for resourcemanagement in a distributed computer system, the program code causingthe processor to: select a host computer of the distributed computersystem on which a client will be initially placed; upon selecting thehost system on which the client will be initially placed, determineassociation inference information for the client, wherein theassociation inference information includes a geographic preference forthe client; determine a resource association between the client and oneor more other resources in the distributed computer system based on theassociation inference information, wherein the one or more otherresources including one or more other clients or host systems in thedistributed computer system, wherein the one or more other resources aretagged with geographical information, and wherein the resourceassociation includes a geographical association between the client and ageographic location for the one or more other resources based on thegeographic preference and the geographical information; andautomatically create an affinity-type rule for the client and the one ormore other resources using the determined resource association, whereinthe affinity-type rule specifies that the client and the one or moreother resources should be connected to each other or disconnected fromeach other, and wherein the computer system performs future resourcemanagement operations in the distributed computer system with respect tothe client or the one or more other resources based on the affinity-typerule.
 16. The computer system of claim 15, wherein the program codefurther causes the processor to: automatically discover geographicalinformation for the one or more other resources in the distributedcomputer system using non-geographical information that indicates thegeographical information for the one or more other resources.
 17. Thecomputer system of claim 16, wherein the non-geographical informationincludes an Internet Protocol address range for a host computer thatindicates a geographical location of the host computer.
 18. The computersystem of claim 15, wherein the association inference informationincludes a non-migration preference for the client and the resourceassociation includes an association between the client and the hostcomputer, and wherein a client-host affinity rule is created for theclient and the host computer.
 19. The computer system of claim 15,wherein the program code further causes the processor to: receive aselection of a group of host computers in a server rack or a bladeenclosure; and automatically create a client-host affinity rule for thehost computers in the group and any clients running on the hostcomputers in the group.
 20. The computer system of claim 15, wherein thefuture resource management operations include a load balancingoperation.